<template>
  <h1>组件</h1>
  <button @click="goOne">每日推荐界面</button><br>
  <button @click="goTwo">热门话题组件</button>
  <button @click="goThree">歌单</button>
  <Content @addTips="addTips"></Content>
</template>

<script>
import Content from "../components/Content.vue";
import { useRouter } from 'vue-router'
export default {
    components:{
      Content
    },
    setup() {
      const router = useRouter();
      const goOne = () => {
        router.push({
          path: '/dailySongsList'
        })
      }
      const goTwo = () => {
        router.push({
          path: '/hotTopic'
        })
      }
      const goThree = () => {
        router.push({
          path: '/gedanSongs/gedan0'
        })
      }
      const addTips = (data) => {
        console.log('data', data);
      };
      return {
        goOne, goTwo, goThree
      }
    }
  }
</script>